var t = require;
var e = module;
var o = exports;
var a,
    i =
        (this && this.__extends) ||
        ((a = function (t, e) {
            return (a =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                })(t, e);
        }),
        function (t, e) {
            a(t, e);
            function o() {
                this.constructor = t;
            }
            t.prototype = null === e ? Object.create(e) : ((o.prototype = e.prototype), new o());
        }),
    n =
        (this && this.__decorate) ||
        function (t, e, o, a) {
            var i,
                n = arguments.length,
                r = n < 3 ? e : null === a ? (a = Object.getOwnPropertyDescriptor(e, o)) : a;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, a);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (i = t[s]) && (r = (n < 3 ? i(r) : n > 3 ? i(e, o, r) : i(e, o)) || r);
            return n > 3 && r && Object.defineProperty(e, o, r), r;
        };
Object.defineProperty(o, "__esModule", {value: !0});
var r = t("ShopGroupItemBase"),
    s = cc._decorator,
    c = s.ccclass,
    p =
        (s.property,
        s.menu,
        (function (t) {
            i(e, t);
            function e() {
                var e = (null !== t && t.apply(this, arguments)) || this;
                e.checkCost = 0;
                e.parseKey = "";
                e.spriteIcon = "";
                return e;
            }
            e.prototype._onClickDoubleTouchEnd = function () {
                var t = this;
                if (PayData.checkPayCost(this.checkCost)) {
                    var e = this._clickDouble.convertToWorldSpaceAR(cc.Vec2.ZERO),
                        o = cc.v2(e).add(cc.v2(-300, 700));
                    PayData.addPayData(
                        this.parseKey,
                        this.checkCost,
                        function (a) {
                            if (a) {
                                QReport.send("220021");
                                var i = {
                                    resId: t.parseKey,
                                    count: 1,
                                    type: 2,
                                    rewadJson: {},
                                    tip: "双倍利润",
                                    tip2: "双倍利润"
                                };
                                PayData.setShopMul(2);
                                EVUIEffView.emit(EVUIEffView.movePropSpriteIcon, e, o, t.spriteIcon);
                                EVUIEffView.emit(EVUIEffView.checkCostUI);
                                t.checkView();
                                PayData.addLog(i.resId, i.count, i.type, [{id: 4, num: 1}], i.tip, i.tip2);
                            }
                        },
                        [{id: 4, num: 1, pid: this.parseKey}]
                    );
                } else console.log("ShopGroupItem01 ----------------- 价格不够");
            };
            e.prototype.onShowEnd = function () {
                this.updateList();
                this.node.active && this.checkView();
            };
            e.prototype.checkView = function () {
                if (PayData.getProMul() > 1) this.node.active = !1;
                else if (this.checkList.length > 0) {
                    this.spriteIcon = this.allKeyList[0];
                    var t = this.checkList[0].cash;
                    this.parseKey = this.allKeyList[0];
                    this.checkCost = parseInt(t);
                    this._costLab.$Label.string = "￥" + t;
                    this._tip.$Label.string = this.tipNodeId;
                }
            };
            return n([c], e);
        })(r.default));
o.default = p;
